package com.he.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName express_shipping_data
 */
@TableName(value ="express_shipping_data")
@Data
public class ExpressShippingData implements Serializable {
    /**
     * 城市ID
     */
    private Integer cityId;

    /**
     * 快递公司 ID
     */
    private Integer companyId;

    /**
     * 文件-1;物品-2
     */
    private Integer expressType;

    /**
     * 收件城市 ID
     */
    private Integer toCityId;

    /**
     * 快递状态
寄件数据：入库件201、在库件【正常件203；滞留件204】、出库件205、丢失件208、撤销件209
     */
    private Integer expressStatus;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExpressShippingData other = (ExpressShippingData) that;
        return (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getExpressType() == null ? other.getExpressType() == null : this.getExpressType().equals(other.getExpressType()))
            && (this.getToCityId() == null ? other.getToCityId() == null : this.getToCityId().equals(other.getToCityId()))
            && (this.getExpressStatus() == null ? other.getExpressStatus() == null : this.getExpressStatus().equals(other.getExpressStatus()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCityId() == null) ? 0 : getCityId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getExpressType() == null) ? 0 : getExpressType().hashCode());
        result = prime * result + ((getToCityId() == null) ? 0 : getToCityId().hashCode());
        result = prime * result + ((getExpressStatus() == null) ? 0 : getExpressStatus().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cityId=").append(cityId);
        sb.append(", companyId=").append(companyId);
        sb.append(", expressType=").append(expressType);
        sb.append(", toCityId=").append(toCityId);
        sb.append(", expressStatus=").append(expressStatus);
        sb.append(", count=").append(count);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}